﻿using System;
using System.Collections.Generic;
using System.Text;

namespace 责任链模式
{
    //实现审批类，总经理
    class President : Approver
    {
        public President(string name):base(name)
        {

        }
        public override void ProcessRequest(PurchaseRequest purchaseRequest)
        {
            if (purchaseRequest.Amount > 25000 && purchaseRequest.Amount < 100000)
            {
                Console.WriteLine("{0}-{1} 批准了购买申请 {2}", this, Name, purchaseRequest.ProductName);
            }
            else
            {
                Console.WriteLine("召开管理层会议，商讨资金使用");
            }
        }
    }
}
